package com.design.pattern.decorator;


/**
 *定义抽象的装饰者
 */
public class AbstractDecorator implements LoansComponent {

    private LoansComponent loansComponent;

    public AbstractDecorator(LoansComponent loansComponent) {
        this.loansComponent = loansComponent;
    }

    @Override
    public void service() {
        if (loansComponent != null) {
            loansComponent.service();
        }
    }
}
